package com.atjava.webspider.model;

import java.util.List;

import com.atjava.jox.annotation.ClassProps;
import com.atjava.jox.annotation.FieldProps;
import com.atjava.jox.annotation.FieldProps.ElementType;
import com.atjava.webspider.logic.Named;

/**
 * 网站页面类型
 * @author Jindong
 *
 */
@ClassProps(alias="page")
public class Page implements Named{

	@FieldProps
	private String name;
	
	@FieldProps
	private byte level;
	
	public int getVarNum(){
		return variables == null ? 0 : variables.size();
	}
	
	/** 变量 */
	@FieldProps(type=ElementType.ELEMENT)
	private List<Variable> variables;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Variable> getVariables() {
		return variables;
	}

	public void setVariables(List<Variable> variables) {
		this.variables = variables;
	}

	public byte getLevel() {
		return level;
	}

	public void setLevel(byte level) {
		this.level = level;
	}
	
}
